#-------------------------------------------------
#
# Project created by QtCreator 2011-12-27T12:26:51
#
#-------------------------------------------------
HOME_DIRECTORY = .
LIBRARY_CROSS_PLAFORM = $$HOME_DIRECTORY/library-cross-platform
LIBRARY_PROJECT       = $$HOME_DIRECTORY/library

QT                 += core gui sql

TARGET             = ItemEditor
TEMPLATE           = app


DEFINES            +=

win32:DEFINES      +=
linux:DEFINES      +=
unix:DEFINES       +=

SOURCES            += main.cpp                                                 \
                      mainwindow.cpp                                           \
                      database/databaseinstancemngr.cpp                        \
                      database/databasemngr.cpp                                \
                      database/databasequery.cpp                               \
                      database/qmysqldabasemngr.cpp                            \
                      database/mysqlquerylist/dbq_getallerrors.cpp             \
                      database/mysqlquerylist/dbq_getterror4module.cpp         \
                      database/mysqlquerylist/dbq_geterrorbyid.cpp             \
                      database/mysqlquerylist/dbquerymodulelist.cpp            \
                      database/queryeclistresult.cpp                           \
                      $$LIBRARY_CROSS_PLAFORM/cpp/math_x.cpp                   \
                      $$LIBRARY_CROSS_PLAFORM/cpp/hash.cpp                     \
                      $$LIBRARY_CROSS_PLAFORM/cpp/parser/asciiparser.cpp       \
                      $$LIBRARY_CROSS_PLAFORM/cpp/parser/parser.cpp            \
                      $$LIBRARY_CROSS_PLAFORM/cpp/parser/parserstate.cpp       \
                      $$LIBRARY_CROSS_PLAFORM/qt/gui/qpopup.cpp                \
                      model/errorcode.cpp                                      \
                      model/module.cpp                                         \
                      model/modulerelease.cpp                                  \
                      model/modulelistmodel.cpp                                \
                      resources/sconst.cpp                                     \
                      ui/cellwidget.cpp                                        \
                      ui/menubuilder.cpp                                       \
                      ui/qtabextwidget.cpp                                     \
                      ui/qtoolbaraction.cpp                                    \
                      ui/qtoolbarview.cpp                                      \
                      ui/errorcodes/errorcodesedit.cpp                         \
                      ui/errorcodes/errorcodestableview.cpp                    \
                      ui/errorcodes/errorcodesview.cpp                         \
                      ui/errorcodes/errorcodeswidget.cpp                       \
                      ui/errorcodes/errorcodedescriptionview.cpp               \
                      ui/errorcodes/errorcodedescriptionedit.cpp               \
                      ui/ipdialog.cpp                                          \
                      ui/databaseipdialog.cpp                                  \
                      ui/modulewidget.cpp                                      \
                      ui/statusbar.cpp                                         \


win32:SOURCES      += $$LIBRARY_CROSS_PLAFORM/cpp/windows/parser/rexp.cpp
linux:SOURCES      += $$LIBRARY_CROSS_PLAFORM/cpp/linux/parser/rexp.cpp
unix:SOURCES       +=


HEADERS            += mainwindow.h                                             \
                      database/databaseinstancemngr.h                          \
                      database/databasemngr.h                                  \
                      database/databasequery.h                                 \
                      database/qmysqldabasemngr.h                              \
                      database/mysqlquerylist/dbq_getallerrors.h               \
                      database/mysqlquerylist/dbq_getterror4module.h           \
                      database/mysqlquerylist/dbq_geterrorbyid.h               \
                      database/mysqlquerylist/dbquerymodulelist.h              \
                      database/queryeclistresult.h                             \
                      model/errorcode.h                                        \
                      model/module.h                                           \
                      model/modulerelease.h                                    \
                      model/modulelistmodel.h                                  \
                      resources/sconst.h                                       \
                      $$LIBRARY_PROJECT/factory.h                              \
                      $$LIBRARY_CROSS_PLAFORM/cpp/math_x.h                     \
                      $$LIBRARY_CROSS_PLAFORM/cpp/hash.h                       \
                      $$LIBRARY_CROSS_PLAFORM/cpp/types.h                      \
                      $$LIBRARY_CROSS_PLAFORM/cpp/unary_functions.h            \
                      $$LIBRARY_CROSS_PLAFORM/cpp/val2string.h                 \
                      $$LIBRARY_CROSS_PLAFORM/cpp/vref.h                       \
                      $$LIBRARY_CROSS_PLAFORM/cpp/parser/asciiparser.h         \
                      $$LIBRARY_CROSS_PLAFORM/cpp/parser/parser.h              \
                      $$LIBRARY_CROSS_PLAFORM/cpp/parser/parserstate.h         \
                      $$LIBRARY_CROSS_PLAFORM/cpp/parser/parserstatehandler.h  \
                      $$LIBRARY_CROSS_PLAFORM/cpp/parser/rexp.h                \
                      $$LIBRARY_CROSS_PLAFORM/qt/gui/qpopup.h                  \
                      ui/cellwidget.h                                          \
                      ui/qtabextwidget.h                                       \
                      ui/menubuilder.h                                         \
                      ui/errorcodes/errorcodeswidget.h                         \
                      ui/errorcodes/errorcodedescriptionview.h                 \
                      ui/errorcodes/errorcodedescriptionedit.h                 \
                      ui/qtoolbaraction.h                                      \
                      ui/qtoolbarview.h                                        \
                      ui/errorcodes/errorcodesedit.h                           \
                      ui/errorcodes/errorcodestableview.h                      \
                      ui/errorcodes/errorcodesview.h                           \
                      ui/errorcodes/errorcodeswidget.h                         \
                      ui/ipdialog.h                                            \
                      ui/databaseipdialog.h                                    \
                      ui/modulewidget.h                                        \
                      ui/statusbar.h                                           \


win32:HEADERS      +=
linux:HEADERS      +=
unix:HEADERS       +=


FORMS              += mainwindow.ui


INCLUDEPATH        += database                                                 \
                      database/mysqlquerylist                                  \
                      library                                                  \
                      $$LIBRARY_CROSS_PLAFORM/c                                \
                      $$LIBRARY_CROSS_PLAFORM/cpp                              \
                      $$LIBRARY_CROSS_PLAFORM/cpp/parser                       \
                      $$LIBRARY_CROSS_PLAFORM/qt/gui                           \
                      model                                                    \
                      ui                                                       \
                      ui/errorcodes                                            \
                      resources                                                \


 win32:INCLUDEPATH  += $$LIBRARY_CROSS_PLAFORM/windows                         \
                       $$LIBRARY_CROSS_PLAFORM/windows/parser
 linux:INCLUDEPATH  += $$LIBRARY_CROSS_PLAFORM/linux                           \
                       $$LIBRARY_CROSS_PLAFORM/linux/parser
 unix:INCLUDEPATH   +=


 win32 {
#     SOURCES += paintwidget_win.cpp
 }

RESOURCES += \
    resources/resource.qrc






RCC_DIR = "$$HOME_DIRECTORY/Build/RCCFiles"
UI_DIR = "$$HOME_DIRECTORY/Build/UICFiles"
MOC_DIR = "$$HOME_DIRECTORY/Build/MOCFiles"
OBJECTS_DIR = "$$HOME_DIRECTORY/Build/ObjFiles"

CONFIG += static
# Everything below takes effect with CONFIG += static
static {

    QMAKE_LFLAGS_DLL   = -static -static-libgcc
    QMAKE_LFLAGS       = -static -static-libgcc
    CONFIG += static
    QTPLUGIN +=
# Equivalent to "#define STATIC" in source code
    DEFINES += STATIC
    message("Static build.")
}



CONFIG(debug, debug|release) {
    DESTDIR = "$$HOME_DIRECTORY/debug"
}
CONFIG(release, debug|release) {
    DESTDIR = "$$HOME_DIRECTORY/release"
}
























